//
//  Common.swift
//  新浪微博项目
//
//  Created by 王炯 on 16/7/20.
//  Copyright © 2016年 王炯. All rights reserved.
//

import UIKit

//登录微博相关信息


//App Key
let APPKEY = "2628099223"

//App Secret
let APPSECRET = "a7c54aaf884fec8b1e6668cb6d40ed09"


/*
//App Key
let APPKEY = "3367173614"

//App Secret
let APPSECRET = "69843d1efabf2074f7ad2c53db30896b"
*/


//回调页
let APPREDIRECT_URI = "http://www.baidu.com"

//登录微博的微博账号和密码
//账号
let weiboName = "wjsnh@yahoo.cn"
//密码
let weiboPassWord = "9999999"


//字体的主题颜色
let THEMEColor = UIColor.orangeColor()


// 屏幕的宽和高
let SCREENW = UIScreen.mainScreen().bounds.width
let SCREENH = UIScreen.mainScreen().bounds.height
// RGB颜色
func RGB(red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat = 1) -> UIColor{
    return UIColor(red: red / 255, green: green / 255, blue: blue / 255, alpha: alpha)
}
// 随机颜色
func RandomColor() ->UIColor{
    let r = random()%256
    let g = random()%256
    let b = random()%256
    return RGB(CGFloat(r), green: CGFloat(g), blue: CGFloat(b))
}


//归档/解档网络数据的地址(用户名/用户头像/uid/token等信息)
let kKeyedArchiverFilePath = (NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.DocumentDirectory, NSSearchPathDomainMask.UserDomainMask, true).last! as NSString).stringByAppendingPathComponent("weiboModel.data")


//微博配图的宽和高
let homePicWandH:CGFloat = 80

//微博配图的间距
let homePicMargin:CGFloat = 5





